home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / newexe.zip / NEWEXE.DOC next >
Text File  |  1991-08-29  |  6KB  |  176 lines

  1.                                NEWEXE
  2.                            by:Thuan-Tit Ewe
  3.                            August 29, 1991
  4.  
  5. NEWEXE, while not intended to totally replace EXEHDR, will however
  6. provide more detailed information about the Windows NE executable file
  7. than ever before. You get names of all external functions dynamically
  8. linked as well as all exported ones.
  9.  
  10. With NEWEXE you can find all documented and undocumented entries into
  11. Windows.
  12.  
  13.  
  14.  
  15. Options galore:
  16. ---------------
  17.         /t[types]
  18.         Valid types are:
  19.                 'h' Header
  20.                 'r' Resource
  21.                 'e' Entry table
  22.                 's' Segment table
  23.                 'l' Relocation tables
  24.                 'b' Resident table
  25.                 'n' Non-resident table
  26.                 'a' All (default)
  27.   o     To selectively display sections of the file. The default action
  28.         of NEWEXE if this option is not specified is all.
  29.  
  30.         /rv     Resource verbose
  31.   o     Display the name directory of resources.
  32.  
  33.         /i      Suppress display of internal relocations
  34.         /c      Outputs C tables
  35.   o     See Q&A below for explanation.
  36.  
  37.         /heap:(0-ffffh)
  38.         /stack:(0-ffffh)
  39.   o     Changes the default heap and stack size. See Microsoft's EXEHDR
  40.         documentation.
  41.  
  42.         /verbose
  43.   o     Verbose option. Will display a little bit more information.
  44.  
  45.         /help
  46.   o     Displays options.
  47.  
  48.         /l      Displays license information.
  49.   o     Self explanatory.
  50.  
  51.  
  52.  
  53. Resources:
  54. ----------
  55. Type:800f, offset: 10240, size:512, flags:1c30, id:8001 Name directory
  56. Type:8004, offset: 10752, size:512, flags:1c30, id:8001 Menu template
  57.  
  58. Above are 2 sample lines that you would see in a typical output. They are
  59. pretty self explanatory except 'Name directory' where a resource names are
  60. kept.
  61.  
  62.  
  63.  
  64. Relocations:
  65. ------------
  66. Relocations are display in groups that pertain to particular segments. They
  67. are normally in the format of:
  68.  
  69. Relocation_item  Relocation_type  Fixup_address  Target
  70.  
  71. Below are some examples of relocation output as well as explanation
  72.   NRSPTR NRRINT 6733 Fixed: 1:0x5349
  73.   Relocation to a fixed segment
  74.  
  75. NRSPTR NRRORD 23eb Module:KERNEL.8      LOCALLOCK
  76.   Import from KERNEL.8
  77.  
  78. NRSPTR NRRINT 06ab Moveable: Ordinal 84:(DRAWICON)Segm:13, offset:0x014d, globdata, exported, moveable.
  79.   Internal relocation to target that's in this executable. In this case
  80.   the target is also exported as DRAWICON
  81.  
  82. NRSPTR NRRINT 0554 Moveable: Ordinal 596:Segm:13, offset:0x07ba, moveable.
  83.   Internal relocation to segment 13:07ba
  84.  
  85.  
  86.  
  87. Entry table:
  88. ------------
  89. Entry table is a weird construct when you first look at it, but in the
  90. case of NE, it is the centerpiece for the whole executable.
  91.  
  92. It comes normally in two formats which I'll discuss later.
  93. The left column contain the ordinal numbers. It is implicitly numbered
  94. so the number generated in this column is internally kept by NEWEXE.
  95. According to what documentation I have, the Dat bit is used to determine
  96. if it uses the Global Data. Next come the segment index and the offset
  97. in decimal and hex.
  98.  
  99. [ 27]  Exprt:1, Dat:1, Words:0, Sgm:13, Offset:1692[069c]
  100.  
  101. [448] Zero type.  (448...450)
  102. At times you will see zero type means that ordinals from 448 to 450 is
  103. currently not used.
  104.  
  105. A point of interest is that all exported entry points come first followed
  106. by internal ones needed for relocation.
  107.  
  108.  
  109.  
  110. Caveats:
  111. --------
  112. NEWEXE currently does not yet handle LE (Linear Executable) used as device
  113. drivers in Windows Enhanced mode.
  114.  
  115. NEWEXE does not configure the original EXE header.
  116.  
  117. Options must be entered in whole. For example, if you want to change heap
  118. you have to enter
  119.  
  120. newexe /stack:0x400 output.exe
  121.  
  122.  
  123.  
  124. Questions and answers:
  125. ----------------------
  126. Q: I'm interested in all exported names, how can I find that out quickly?
  127. A: Use option '/tn'
  128.    which stand for 'display type: non-resident table'
  129.    If you have a file that exports in names instead of ordinals
  130.    Use '/tb' to display resident name table.
  131.  
  132. Q: How do I find all imported function quickly?
  133. A: Use option '/tl /i'
  134.    To display just the fixups and suppress internal fixups.
  135.  
  136. Q: Why don't I see resource names when I know my application uses them ?
  137. A: Windows 3.0 resource names are kept in resource directory that is
  138.    not documented anywhere. To see them use '/rv' to verbose on resource.
  139.  
  140. Q: I'd like to make use of the information being dumped in my program,
  141.    how do I do that?
  142. A: Use '/c' to dump resident and non-resident name tables in an array
  143.    initiazation form for C language that you can compile and link. In
  144.    fact, NEWEXE was built using this mechanism.
  145.  
  146. Q: Why does it take so long to dump system DLLs like USER.EXE ?
  147. A: NEWEXE will take some time to scan for the exported name so
  148.    that it can print a reasonable output for relocations into those
  149.    exported names. This will only pose a minor irritation if you dump
  150.    a big DLL, otherwise don't worry about it.
  151.    Use '/i' to suppress printing of internal relocations if you don't
  152.    care about them.
  153.  
  154.  
  155.  
  156. License information:
  157. --------------------
  158. You are free to use, copy and distribute NEWEXE v0.01 for noncommercial
  159. use IF:
  160.         NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
  161.         IT IS NOT MODIFIED IN ANY WAY.
  162.         IT IS ACCOMPANIED BY ITS PROPER DOCUMENTATION.
  163.  
  164. This program is provided AS IS without any warranty, expressed or implied,
  165. including but not limited to fitness for a particular purpose.
  166.  
  167. If you have any questions or comments about NEWEXE, drop me a note in
  168. CompuServe or send them to:
  169.  
  170. CompuServe:70324,3557                    Thuan-Tit Ewe
  171.                                          P.O. Box 1016
  172.                                          Capitola, CA 95010
  173.  
  174. NEWEXE and this documentation is
  175. Copyright (C) 1991 by Thuan-Tit Ewe.
  176.